Reset the option-parsing object before using it -- this means that the
authorEwan Mellor <ewan@xensource.com>
Tue, 2 Jan 2007 14:46:13 +0000 (14:46 +0000)
committerEwan Mellor <ewan@xensource.com>
Tue, 2 Jan 2007 14:46:13 +0000 (14:46 +0000)
option parsing works when using xm shell.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xm/migrate.py
tools/python/xen/xm/shutdown.py

index 72aca719329dfd3ec42a97d2712b9dd8fee6c7dc..2b77e6b1ab62cba0e7e20b1f3cb6908914c25352 100644 (file)
@@ -52,6 +52,7 @@ def help():
     
 def main(argv):
     opts = gopts
+    opts.reset()
     args = opts.parse(argv)
     
     if len(args) != 2:
index b5542d9611a864e89020989c5fc976409aac9018..88d36dfba15a99680fbc954729fecd922e2bfe06 100644 (file)
@@ -118,6 +118,7 @@ def main_dom(opts, args):
     
 def main(argv):
     opts = gopts
+    opts.reset()
     args = opts.parse(argv)
     if opts.vals.help:
         return